<template>
	<view class="warp">
		<view class="mt30 flex">
			<view class="box_warp" style="width: 45%;margin-right: 10rpx;">
				<image style="width: 100%;" src="../../../static/002.png" mode="widthFix"
					@click="jumpto('/pages/psychology/index')"></image>
				<view class="title1">心理学</view>
				<view class="title2">心理学推荐院校</view>
			</view>
			<view class="box_warp" style="width: 45%;margin-left: 10rpx;">
				<image style="width: 100%;" src="../../../static/001.png" mode="widthFix"
					@click="jumpto('/pages/education/index')"></image>
				<view class="title1">心理健康教育</view>
				<view class="title2">心理健康教育推荐院校</view>
			</view>
		</view>
		<view class="mt30" style="padding: 0 30rpx;">
			<view class="title">
				<image src="../../../static/dengpao.png"
					style="width: 40rpx;height: 40rpx;vertical-align:middle;margin-right: 10rpx;" mode="aspectFill">
				</image>
				择校小助手<text class="s-title2 ml10">(专业和方向选择)</text>
			</view>

			<view class="list">
				<radio-group>
					<label v-for="(item, index) in items" :key="index" @click="radioChange(item)">
						<view class="item">
							<radio :value="value" :checked="index === current" />
							<view class="ml30" style="width: 80%;">{{item.name}}</view>
						</view>
						<view class="line mt30"></view>
					</label>
				</radio-group>
			</view>
			<view class="btn mt30">
				<button class="mt30" style="width: 70%;" type="primary" @click="queryschool">查看院校</button>
			</view>
		</view>
		<view class="footer">
			<view class="word1 mt30">*不懂心理学和心理健康教育怎么选?
				<text class="word2">《择校小助手指南》</text>
			</view>
			<view class="word1 mt30">*不懂学硕和专硕怎么选?
				<text class="word2">《学硕和专硕的异同》</text>
			</view>
			<view class="word1 mt30">*不懂全日制和非全日制怎么选?
				<text class="word2">《学制的异同》</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: "",
				items: [{
						prop: {
							typedata: "心理学",
							masterdata: "学硕"
						},
						url: "/pages/psychology/index",
						name: '心理学学硕'
					},
					{
						url: '/pages/psychology/index',
						name: '心理学专硕（全日制）',
						prop: {
							typedata: "心理学",
							masterdata: "专硕",
							systemdata: "全日制"
						},
					},
					{
						prop: {
							typedata: "心理学",
							masterdata: "专硕",
							systemdata: "非全日制"
						},
						url: '/pages/psychology/index',
						name: '心理学专硕（非全日制）'
					},
					{
						prop: {
							typedata: "心理健康教育",
							systemdata: "全日制"
						},
						url: '/pages/education/index',
						name: '心理健康教育（全日制）'
					},
					{
						prop: {
							typedata: "心理健康教育",
							systemdata: "非全日制"
						},
						url: '/pages/education/index',
						name: '心理健康教育（非全日制）'
					},
				],
				activeList: {},
			}
		},
		methods: {
			radioChange(e) {
				console.log(e)
				this.activeList = e
			},
			// 查看院校
			queryschool() {
				uni.setStorageSync('filterDate', this.activeList.prop)
				uni.switchTab({
					url: this.activeList.url
				})


			},
			jumpto(e) {
				uni.switchTab({
					url: e
				})
			}
		},
	}
</script>

<style scoped lang="less">
	.warp {
		width: 100%;
		height: 100%;
		position: fixed;
		background-color: #FFFFFF;

		.box_warp {
			position: relative;

			.title1 {
				position: absolute;
				color: #FFFFFF;
				top: 20rpx;
				left: 20rpx;
				font-size: 35rpx;
				font-weight: 600;
			}

			.title2 {
				position: absolute;
				color: #FFFFFF;
				top: 80rpx;
				left: 20rpx;
				font-size: 22rpx;
				font-weight: 400;
			}
		}
	}

	.title {
		font-size: 35rpx;
		font-weight: 400;
	}

	/deep/.component-view-scroll-nav .navbar .nav-item {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		padding: 0 30rpx;
		white-space: nowrap;
		margin-top: -30rpx;
		width: 100%;
		-webkit-box-pack: center;
		-webkit-justify-content: center;
		justify-content: center;
	}

	.item {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		margin-top: 30rpx;
	}

	.list {
		padding: 0 30rpx;
	}

	.navigat-arrow {
		height: 90upx;
		width: 40upx;
		line-height: 90upx;
		font-size: 34upx;
		color: #555;
		text-align: right;
		/* font-family: texticons; */
	}

	.footer {
		width: 85%;
		margin-left: 50%;
		transform: translateX(-50%);
		margin-top: 80rpx;
		height: 200rpx;
		padding: 30rpx;
		background-color: rgb(229, 229, 229);

		.word1 {
			font-size: 26rpx;
			color: #666666;
		}

		.word2 {
			font-size: 26rpx;
			color: #527DFF;
		}
	}
</style>
